<template>
  <!-- 首页加载全屏动画 -->
  <FullLoading v-if="isFullLoading" />
  <NuxtLoadingIndicator :throttle="0"/>
  <NuxtLayout>
    <NuxtPage />
  </NuxtLayout>
</template>

<script setup lang="ts">
useHead({
  title: "超控科技",
  link: [{ rel: 'icon', type: 'image/x-icon', href: 'favicon.ico' }],
  meta: [
    { name: 'keywords', content: 'Nuxt3,Nuxt3开发模版,Vue3，Pinia,TypeScript,SSR,CSR' },
    { name: 'description', content: '采用Nuxt3+Vue3 打造的高质量的SSR\CSR研发模版' }
  ]
})

const nuxtApp = useNuxtApp()

// 是否首次加载
const isFullLoading = ref(true)

nuxtApp.hook('page:start', () => {
  isFullLoading.value = true
})

nuxtApp.hook('page:finish', () => {
  isFullLoading.value = false
})

</script>

<style>
.page-enter-active,
.page-leave-active {
  transition: all 0.4s;
}
.page-enter-from,
.page-leave-to {
  opacity: 0;
  filter: blur(1rem);
}

.layout-enter-active,
.layout-leave-active {
  transition: all 0.4s;
}
.layout-enter-from,
.layout-leave-to {
  filter: grayscale(1);
}
</style>
